<%@ page language="java" pageEncoding="UTF-8"%>
<div ng-controller="UserMailSystemShowController">
	<div class="panel panel-default">
		<div class="panel-heading">
			系统邮件
			<span class="pull-right">
				<button type="button" class="btn btn-default btn-sm" ng-click="create()"><i class="glyphicon glyphicon-plus-sign"></i> 创建</button>
			</span>
		</div>
		<div class="panel-body">
			<div ng-repeat="mail in mail.data" class="media msg">
				<div class="clearfix">
					<div class="pull-left">
						<a class="pull-left" ng-href="#/user/{{mail.author.id}}/home">
							<img class="media-object panel panel-default" style="width: 50px; height: 50px;" ng-src="{{mail.author.headphoto | path}}">
						</a>
					</div>
					<div class="pull-left" style="margin-left: 10px;"">
						<a href="javascript:void(0);" ng-click="pre(mail)" title="{{mail.title | textOnly}}">
							{{mail.title | summary:80}}
						</a>
						
						<div style="color: #777;margin-top:20px; margin-left: 10px;">
							{{mail.content | textOnly | summary:80}}
						</div>
						
						<div style="color: #777;margin-top:20px; margin-left: 10px;">
							<span style="margin-right: 10px;">
								<i class="glyphicon glyphicon-user"></i> <a ng-href="#/user/{{mail.author.id}}/home">{{mail.author.username}}</a>
							</span>
							<span style="margin-right: 10px;" message="'发送于{{mail.create_time | formatDate}}'" tooltip>
								<i class="glyphicon glyphicon-time"></i> {{mail.create_time | formatDate:true}}
							</span>
							<span style="margin-right: 10px;">
								接收角色:
								<span ng-repeat="role in role">
									<span ng-show="role.id==mail.role">
										{{role.name}}
									</span>
								</span>
							</span>
						</div>
					</div>
				</div>
				<hr/>
			</div>
			<paginate page-count="mail.page_count" sum="mail.data_sum" pn="mail.pn" click="find"></paginate>
		</div>
	</div>
</div>